package com.example.templateapp.ui.adapter.base

import com.alibaba.android.vlayout.LayoutHelper

/**
 *
 * @ProjectName:    TruckPriceChargeKotlin
 * @Package:        com.mtl.truckpricechargekotlin.adapter.base
 * @ClassName:      SimpleDelegateAdapter
 * @Description:    java类作用描述
 * @Author:         yang yang
 * @CreateDate:     2020/5/7 0007 14:48
 * @UpdateUser:     更新者
 * @UpdateDate:     2020/5/7 0007 14:48
 * @UpdateRemark:   更新说明：
 * @Version:        1.0
 */
abstract class SimpleDelegateAdapter<T> : BaseDelegateAdapter<T> {

    private var mLayoutId = 0

    private var mLayoutHelper: LayoutHelper? = null

    constructor(layoutId: Int,layoutHelper: LayoutHelper):super(){
        mLayoutId = layoutId
        mLayoutHelper = layoutHelper
    }

    constructor(layoutId: Int,layoutHelper: LayoutHelper,list: Collection<T>):super(list){
        mLayoutId = layoutId
        mLayoutHelper = layoutHelper
    }

    constructor(layoutId: Int,layoutHelper: LayoutHelper,data:Array<T>):super(data){
        mLayoutId = layoutId
        mLayoutHelper = layoutHelper
    }


    override fun getItemLayoutId(layoutId: Int): Int {
        return mLayoutId
    }


    override fun onCreateLayoutHelper(): LayoutHelper? {
        return mLayoutHelper
    }
}